﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hartley.BusinessLogic;
using Hartley.DTOs;
using Hartley.Entities;

namespace Hartley.ApplicationLogic
{
   public class StudentAL
    {
        HcFacade hcFacade = new HcFacade();
        public void saveStudent(StudentDTO studentDTO)
        {
            hcFacade.saveStudent(studentDTO);
        }


        public string saveALResults(ALResultsDTO aLResultsDTO)
        {
            try
            {
               return hcFacade.saveALResults(aLResultsDTO);
            }
            catch
            {
                throw;
            }
        }

        public string saveOLResults(OLResultsDTO oLResultsDTO)
        {
            try
            {
                return hcFacade.saveOLResults(oLResultsDTO);
            }
            catch
            {
                throw;
            }
        }

        public string SavePrefectBatch(PrefectBatchDTO prefectBatchDTO)
        {
            try
            {
                return hcFacade.SavePrefectBatch(prefectBatchDTO);
            }
            catch
            {
                throw;
            }
        }

        public string SavePrefects(PrefectDTO prefectDTO)
        {
            try
            {
                return hcFacade.SavePrefects(prefectDTO);
            }
            catch
            {
                throw;
            }
        }


        public List<StudentDTO> GetStudents()
        {
            return hcFacade.GetStudents();
        }

        public List<StudentDTO> GetStudentById(Guid studentId)
        {
            return hcFacade.GetStudentById(studentId);
        }

        public List<StudentDTO> GetStudentByOLYear(string olYear)
        {
            return hcFacade.GetStudentByOLYear(olYear);
        }

        public List<OLResultsDTO> GetAllOLevelResults()
        {
            return hcFacade.GetAllOLevelResults();
        }

        public List<OLResultsDTO> GetOLevelResultByYear(int olevelYr)
        {
            return hcFacade.GetOLevelResultByYear(olevelYr);
        }

        public List<ALResultsDTO> GetAllALevelResults()
        {
            return hcFacade.GetAllALevelResults();
        }

        public List<ALResultsDTO> GetALevelResultByYear(int alevelYr)
        {
            return hcFacade.GetALevelResultByYear(alevelYr);
        }

        public List<PrefectBatchDTO> GetAllPrefectBatches()
        {
            try
            {
                return hcFacade.GetAllPrefectBatches();
            }
            catch
            {
                throw;
            }
        }

        public List<PrefectDTO> GetPrefectsByPrefectBatchId(Guid prefectBatchId)
        {
            try
            {
                return hcFacade.GetPrefectsByPrefectBatchId(prefectBatchId);
            }
            catch
            {
                throw;
            }
        }


        public List<PrefectDTO> GetAllPrefects()
        {
            try
            {
                return hcFacade.GetAllPrefects();
            }
            catch
            {
                throw;
            }
        }

        public List<PrefectBatchDTO> GetPrefectBatchById(Guid prefectBatchId)
        {
            try
            {
                return hcFacade.GetPrefectBatchById(prefectBatchId);
            }
            catch
            {
                throw;
            }
        }

        public List<PrefectDTO> GetPrefectsById(Guid prefectId)
        {
            try
            {
                return hcFacade.GetPrefectsById(prefectId);
            }
            catch
            {
                throw;
            }
        }
    }
}
